 <template>
   <!--分页 begin-->
  <div style="margin: 10px 0">
    <!--子组件 接收父组件传的值-->
    <div class="block">
      <el-pagination
        @size-change="sizeChange"
        @current-change="currentChange"
        :current-page="currentPage"
        :page-sizes="pageSizes"
        :page-size="pageNum"
        layout="sizes, prev, pager, next, jumper, total"
        :total="totalNum">
      </el-pagination>
    </div>
  </div>
   <!--分页 end-->
</template>

<script>
export default {
  data() {
    return {
      currentPage: 1
    }
  },
  props: {
    pageSizes: {
      type: Array,
      default: null
    },
    pageNum: {
      type: Number,
      default: null
    },
    totalNum: {
      type: Number,
      default: null
    },
    sizeChange: {
      type: Function
    },
    currentChange: {
      type: Function
    }
  },
  created() {
    // console.log(typeof this.totalNum)
  },
  methods: {
    // handleSizeChange(val) {
    //   console.log(`每页 ${val} 条`)
    // },
    // handleCurrentChange(val) {
    //   console.log(`当前页: ${val}`)
    // }
  }
}
</script>
<style scoped>

</style>

